//
//  NetworkUtils.h
//
//  AFNetworking 3.0

#import <Foundation/Foundation.h>
#import "AFNetworking.h"

@interface NetworkUtils : NSObject

@property (nonatomic, strong) NSDictionary *mimeTypeDictionary;

//网络请求
+ (void)requestWithMethod:(NSString *)method
                      URL:(NSString *)URLString
                    param:(NSArray *)param
        completionHandler:(void (^)(id responseObject, NSError* connectionError))handler;

//上传文件
+ (void)uploadImageWithURL:(NSString *)URLString
                     param:(NSArray *)param
                      data:(NSArray *)data
                      name:(NSArray *)name
                  filename:(NSArray *)filename
         completionHandler:(void (^)(id responseObject, NSError* connectionError))handler;

+ (void)uploadImageNoHandleWithURL:(NSString*)URLString
                             param:(NSMutableDictionary*)param
                              data:(NSArray*)data
                              name:(NSArray*)name
                          filename:(NSArray*)filename
                 completionHandler:(void (^)(id, NSError *))handler;

+ (void)uploadFileNoHandleWithURL:(NSString*)URLString
                            param:(NSMutableDictionary*)param
                             data:(NSArray*)data
                             name:(NSArray*)name
                         filename:(NSArray*)filename
                completionHandler:(void (^)(id responseObject, NSError* connectionError))handler;

//下载文件
+ (void)downloadFileWithURL:(NSString*)URLString
                   filePath:(NSString*)filePath
                   progress:(void (^)(NSProgress *downloadProgress))downloadProgressBlock
          completionHandler:(void (^)(id responseObject, NSError* connectionError))handler;

//监控网络状态
+ (void)reachabilityStatusChange;

+ (void)requestNOHandleWithMethod:(NSString *)method
                      URL:(NSString *)URLString
                    param:(NSDictionary *)param
        completionHandler:(void (^)(id responseObject, NSError* connectionError))handler;


+ (BOOL)checkForNullPointer:(id)object;


@end
